inertia.tfsens
and inertia.tfsensmatrix
differentiate a transfer function to find sensitivity
of inertia to perturbation. If vector="n"
then either bound="upper"
or bound="lower"
must be specified, so calculating the sensitivity of the upper or lower bound on population
inertia respectively. Specifying vector
overrides calculation of a bound, and will yield
sensitivity of case-specific inertia.
inertia.tfsens
may be used to find sensitivity of a particular perturbation structure. A desired
perturbation structure can be determined by d%*%t(e)
. Therefore, the rows to be perturbed
are determined by d
and the columns to be perturbed are determined by e
. The specific
values in d and e will determine the relative perturbation magnitude. So for example, if only entry
[3,2] of a 3 by 3 matrix is to be perturbed, then d = c(0,0,1)
and e = c(0,1,0)
. If entries
[3,2] and [3,3] are to be perturbed with the magnitude of perturbation to [3,2] half that of [3,3] then
d = c(0,0,1)
and e = c(0,0.5,1)
. d
and e
may also be expressed as column
vectors of class matrix, e.g. d = matrix(c(0,0,1), ncol=1)
, e = matrix(c(0,0.5,1), ncol=1)
.
See Hodgson et al. (2006) for more information on perturbation structures.
inertia.tfsensmatrix
returns a matrix of sensitivity values for observed transitions, where the sensitivity
of each matrix element is evaluated seperately.
The formula used by inertia.tfsens
and inertia.tfsensmatrix
cannot be evaluated at lambda-max, therefore
it is necessary to find the limit of the formula as lambda approaches lambda-max. This is done using a bisection method,
starting at a value of lambda-max + startval
. startval
should be small, to avoid the potential of false convergence.
The algorithm continues until successive sensitivity calculations are within an accuracy of one another, determined by
tolerance
: a tolerance
of 1e-10 means that the sensitivity calculation should be accurate to 10 decimal places.
However, as the limit approaches lambda-max, matrices become uninvertible (singular): if matrices are found to be singular
then tolerance
should be relaxed and made larger.
For inertia.tfsens
, there is an extra option to return and/or plot the above fitting process using return.fit=TRUE
and plot.fit=TRUE
respectively.